const {Article} = require('../../model/article');

module.exports = async (req,res) => {
    const id = req.query.id;
    // const user = await Article.findOne({_id: req.query.id});
    await Article.findOneAndDelete({_id: id});

    // res.send(user)
    // return
    res.redirect('/admin/article');
}